Ext.namespace('Ext.ux');

/**
 * Fixes a bug in the PagingToolbar implementation which means that it zaps 
 * any params you have previously passed to the store.
 *
 * @class Ext.ux.FilteredPagingToolbar
 */
Ext.ux.FilteredPagingToolbar = function(conf){
	Ext.ux.FilteredPagingToolbar.superclass.constructor.call(this,conf);
};
Ext.extend(Ext.ux.FilteredPagingToolbar, Ext.PagingToolbar, {

    doLoad : function(start){
    	var lastOptions = this.store.lastOptions;
    	
    	var lastParams = lastOptions.params||{};
        var o = {}, pn = this.paramNames;
        Ext.applyIf(o,lastParams);
        o[pn.start] = start;
        o[pn.limit] = this.pageSize;
        this.store.load({params:o});
    }

});